﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// abstract BangGiaSanPham typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class BangGiaSanPhamDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<BangGiaSanPhamDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.BangGiaSanPham _currentBangGiaSanPham = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxBangGiaSanPhamDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxBangGiaSanPhamErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxBangGiaSanPhamBindingSource;
		
		/// <summary> 
		/// the DGV column associated with the IDSanPham property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDSanPhamDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDNhaCungCap property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDNhaCungCapDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDDiaBan property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDDiaBanDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the KichHoat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxKichHoatDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ChungThuc property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxChungThucDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TrangThai property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxTrangThaiDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ChoNhapGia property
		/// </summary>
		protected System.Windows.Forms.DataGridViewCheckBoxColumn uxChoNhapGiaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DonGia property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDonGiaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the VAT property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxVATDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDNgoaiTe property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDNgoaiTeDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the SoLuongTrongKho property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSoLuongTrongKhoDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the TieuChuanKyThuat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxTieuChuanKyThuatDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Thongtinthem property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThongtinthemDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemDangBaoGia property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemDangBaoGiaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemHetHieuLuc property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemHetHieuLucDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemChinhSua property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemChinhSuaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the ThoiDiemCapNhat property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxThoiDiemCapNhatDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the KeyBangGia property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKeyBangGiaDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.NgoaiTe> _IDNgoaiTeList;
		
		/// <summary> 
		/// The list of selectable NgoaiTe
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.NgoaiTe> IDNgoaiTeList
		{
			get {return this._IDNgoaiTeList;}
			set 
			{
				this._IDNgoaiTeList = value;
				this.uxIDNgoaiTeDataGridViewColumn.DataSource = null;
				this.uxIDNgoaiTeDataGridViewColumn.DataSource = this._IDNgoaiTeList;
			}
		}
		
		private bool _allowNewItemInIDNgoaiTeList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of NgoaiTe
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDNgoaiTeList
		{
			get { return _allowNewItemInIDNgoaiTeList;}
			set
			{
				this._allowNewItemInIDNgoaiTeList = value;
				this.uxIDNgoaiTeDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.SanPham> _IDSanPhamList;
		
		/// <summary> 
		/// The list of selectable SanPham
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.SanPham> IDSanPhamList
		{
			get {return this._IDSanPhamList;}
			set 
			{
				this._IDSanPhamList = value;
				this.uxIDSanPhamDataGridViewColumn.DataSource = null;
				this.uxIDSanPhamDataGridViewColumn.DataSource = this._IDSanPhamList;
			}
		}
		
		private bool _allowNewItemInIDSanPhamList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of SanPham
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDSanPhamList
		{
			get { return _allowNewItemInIDSanPhamList;}
			set
			{
				this._allowNewItemInIDSanPhamList = value;
				this.uxIDSanPhamDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.DiaBan> _IDDiaBanList;
		
		/// <summary> 
		/// The list of selectable DiaBan
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.DiaBan> IDDiaBanList
		{
			get {return this._IDDiaBanList;}
			set 
			{
				this._IDDiaBanList = value;
				this.uxIDDiaBanDataGridViewColumn.DataSource = null;
				this.uxIDDiaBanDataGridViewColumn.DataSource = this._IDDiaBanList;
			}
		}
		
		private bool _allowNewItemInIDDiaBanList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of DiaBan
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDDiaBanList
		{
			get { return _allowNewItemInIDDiaBanList;}
			set
			{
				this._allowNewItemInIDDiaBanList = value;
				this.uxIDDiaBanDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.NhaCungCap> _IDNhaCungCapList;
		
		/// <summary> 
		/// The list of selectable NhaCungCap
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.NhaCungCap> IDNhaCungCapList
		{
			get {return this._IDNhaCungCapList;}
			set 
			{
				this._IDNhaCungCapList = value;
				this.uxIDNhaCungCapDataGridViewColumn.DataSource = null;
				this.uxIDNhaCungCapDataGridViewColumn.DataSource = this._IDNhaCungCapList;
			}
		}
		
		private bool _allowNewItemInIDNhaCungCapList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of NhaCungCap
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDNhaCungCapList
		{
			get { return _allowNewItemInIDNhaCungCapList;}
			set
			{
				this._allowNewItemInIDNhaCungCapList = value;
				this.uxIDNhaCungCapDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.BangGiaSanPham> _BangGiaSanPhamList;
				
		/// <summary> 
		/// The list of BangGiaSanPham to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.BangGiaSanPham> BangGiaSanPhamList
		{
			get {return this._BangGiaSanPhamList;}
			set
			{
				this._BangGiaSanPhamList = value;
				this.uxBangGiaSanPhamBindingSource.DataSource = null;
				this.uxBangGiaSanPhamBindingSource.DataSource = value;
				this.uxBangGiaSanPhamDataGridView.DataSource = null;
				this.uxBangGiaSanPhamDataGridView.DataSource = this.uxBangGiaSanPhamBindingSource;				
				//this.uxBangGiaSanPhamBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxBangGiaSanPhamBindingSource_ListChanged);
				this.uxBangGiaSanPhamBindingSource.CurrentItemChanged += new System.EventHandler(OnBangGiaSanPhamBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnBangGiaSanPhamBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentBangGiaSanPham = uxBangGiaSanPhamBindingSource.Current as Entities.BangGiaSanPham;
			
			if (_currentBangGiaSanPham != null)
			{
				_currentBangGiaSanPham.Validate();
			}
			//_BangGiaSanPham.Validate();
			OnCurrentEntityChanged();
		}

		//void uxBangGiaSanPhamBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.BangGiaSanPham"/> instance.
		/// </summary>
		public Entities.BangGiaSanPham SelectedBangGiaSanPham
		{
			get {return this._currentBangGiaSanPham;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxBangGiaSanPhamDataGridView.VirtualMode;}
			set
			{
				this.uxBangGiaSanPhamDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxBangGiaSanPhamDataGridView.AllowUserToAddRows;}
			set {this.uxBangGiaSanPhamDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxBangGiaSanPhamDataGridView.AllowUserToDeleteRows;}
			set {this.uxBangGiaSanPhamDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxBangGiaSanPhamDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxBangGiaSanPhamDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="BangGiaSanPhamDataGridViewBase"/> class.
		/// </summary>
		public BangGiaSanPhamDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxBangGiaSanPhamDataGridView = new System.Windows.Forms.DataGridView();
			this.uxBangGiaSanPhamBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxBangGiaSanPhamErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDSanPhamDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDNhaCungCapDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxIDDiaBanDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxKichHoatDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxChungThucDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxTrangThaiDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxChoNhapGiaDataGridViewColumn = new System.Windows.Forms.DataGridViewCheckBoxColumn();
			this.uxDonGiaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxVATDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDNgoaiTeDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxSoLuongTrongKhoDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxTieuChuanKyThuatDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThongtinthemDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemDangBaoGiaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemHetHieuLucDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemChinhSuaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxThoiDiemCapNhatDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKeyBangGiaDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDNgoaiTeBindingSource = new NgoaiTeBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDNgoaiTeBindingSource)).BeginInit();
			//this.uxIDSanPhamBindingSource = new SanPhamBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSanPhamBindingSource)).BeginInit();
			//this.uxIDDiaBanBindingSource = new DiaBanBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDiaBanBindingSource)).BeginInit();
			//this.uxIDNhaCungCapBindingSource = new NhaCungCapBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDNhaCungCapBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxBangGiaSanPhamErrorProvider
			// 
			this.uxBangGiaSanPhamErrorProvider.ContainerControl = this;
			this.uxBangGiaSanPhamErrorProvider.DataSource = this.uxBangGiaSanPhamBindingSource;						
			// 
			// uxBangGiaSanPhamDataGridView
			// 
			this.uxBangGiaSanPhamDataGridView.AutoGenerateColumns = false;
			this.uxBangGiaSanPhamDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxBangGiaSanPhamDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDSanPhamDataGridViewColumn,
		this.uxIDNhaCungCapDataGridViewColumn,
		this.uxIDDiaBanDataGridViewColumn,
		this.uxKichHoatDataGridViewColumn,
		this.uxChungThucDataGridViewColumn,
		this.uxTrangThaiDataGridViewColumn,
		this.uxChoNhapGiaDataGridViewColumn,
		this.uxDonGiaDataGridViewColumn,
		this.uxVATDataGridViewColumn,
		this.uxIDNgoaiTeDataGridViewColumn,
		this.uxSoLuongTrongKhoDataGridViewColumn,
		this.uxTieuChuanKyThuatDataGridViewColumn,
		this.uxThongtinthemDataGridViewColumn,
		this.uxThoiDiemDangBaoGiaDataGridViewColumn,
		this.uxThoiDiemHetHieuLucDataGridViewColumn,
		this.uxThoiDiemChinhSuaDataGridViewColumn,
		this.uxThoiDiemCapNhatDataGridViewColumn,
		this.uxKeyBangGiaDataGridViewColumn			});
			this.uxBangGiaSanPhamDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxBangGiaSanPhamDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxBangGiaSanPhamDataGridView.Name = "uxBangGiaSanPhamDataGridView";
			this.uxBangGiaSanPhamDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxBangGiaSanPhamDataGridView.TabIndex = 0;	
			this.uxBangGiaSanPhamDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxBangGiaSanPhamDataGridView.EnableHeadersVisualStyles = false;
			this.uxBangGiaSanPhamDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnBangGiaSanPhamDataGridViewDataError);
			this.uxBangGiaSanPhamDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnBangGiaSanPhamDataGridViewCellValueNeeded);
			this.uxBangGiaSanPhamDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnBangGiaSanPhamDataGridViewCellValuePushed);
			
			//
			// uxIDSanPhamDataGridViewColumn
			//
			this.uxIDSanPhamDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDSanPhamDataGridViewColumn.DataPropertyName = "IDSanPham";
			this.uxIDSanPhamDataGridViewColumn.HeaderText = "IDSanPham";
			this.uxIDSanPhamDataGridViewColumn.Name = "uxIDSanPhamDataGridViewColumn";
			this.uxIDSanPhamDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDSanPhamDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDSanPhamDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDNhaCungCapDataGridViewColumn
			//
			this.uxIDNhaCungCapDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDNhaCungCapDataGridViewColumn.DataPropertyName = "IDNhaCungCap";
			this.uxIDNhaCungCapDataGridViewColumn.HeaderText = "IDNhaCungCap";
			this.uxIDNhaCungCapDataGridViewColumn.Name = "uxIDNhaCungCapDataGridViewColumn";
			this.uxIDNhaCungCapDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDNhaCungCapDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDNhaCungCapDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDDiaBanDataGridViewColumn
			//
			this.uxIDDiaBanDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDiaBanDataGridViewColumn.DataPropertyName = "IDDiaBan";
			this.uxIDDiaBanDataGridViewColumn.HeaderText = "IDDiaBan";
			this.uxIDDiaBanDataGridViewColumn.Name = "uxIDDiaBanDataGridViewColumn";
			this.uxIDDiaBanDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDiaBanDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDiaBanDataGridViewColumn.ReadOnly = false;		
			//
			// uxKichHoatDataGridViewColumn
			//
			this.uxKichHoatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKichHoatDataGridViewColumn.DataPropertyName = "KichHoat";
			this.uxKichHoatDataGridViewColumn.HeaderText = "KichHoat";
			this.uxKichHoatDataGridViewColumn.Name = "uxKichHoatDataGridViewColumn";
			this.uxKichHoatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKichHoatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKichHoatDataGridViewColumn.ReadOnly = false;		
			//
			// uxChungThucDataGridViewColumn
			//
			this.uxChungThucDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxChungThucDataGridViewColumn.DataPropertyName = "ChungThuc";
			this.uxChungThucDataGridViewColumn.HeaderText = "ChungThuc";
			this.uxChungThucDataGridViewColumn.Name = "uxChungThucDataGridViewColumn";
			this.uxChungThucDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxChungThucDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxChungThucDataGridViewColumn.ReadOnly = false;		
			//
			// uxTrangThaiDataGridViewColumn
			//
			this.uxTrangThaiDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTrangThaiDataGridViewColumn.DataPropertyName = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.HeaderText = "TrangThai";
			this.uxTrangThaiDataGridViewColumn.Name = "uxTrangThaiDataGridViewColumn";
			this.uxTrangThaiDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTrangThaiDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTrangThaiDataGridViewColumn.ReadOnly = false;		
			//
			// uxChoNhapGiaDataGridViewColumn
			//
			this.uxChoNhapGiaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxChoNhapGiaDataGridViewColumn.DataPropertyName = "ChoNhapGia";
			this.uxChoNhapGiaDataGridViewColumn.HeaderText = "ChoNhapGia";
			this.uxChoNhapGiaDataGridViewColumn.Name = "uxChoNhapGiaDataGridViewColumn";
			this.uxChoNhapGiaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxChoNhapGiaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxChoNhapGiaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDonGiaDataGridViewColumn
			//
			this.uxDonGiaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDonGiaDataGridViewColumn.DataPropertyName = "DonGia";
			this.uxDonGiaDataGridViewColumn.HeaderText = "DonGia";
			this.uxDonGiaDataGridViewColumn.Name = "uxDonGiaDataGridViewColumn";
			this.uxDonGiaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDonGiaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDonGiaDataGridViewColumn.ReadOnly = false;		
			//
			// uxVATDataGridViewColumn
			//
			this.uxVATDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxVATDataGridViewColumn.DataPropertyName = "VAT";
			this.uxVATDataGridViewColumn.HeaderText = "VAT";
			this.uxVATDataGridViewColumn.Name = "uxVATDataGridViewColumn";
			this.uxVATDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxVATDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxVATDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDNgoaiTeDataGridViewColumn
			//
			this.uxIDNgoaiTeDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDNgoaiTeDataGridViewColumn.DataPropertyName = "IDNgoaiTe";
			this.uxIDNgoaiTeDataGridViewColumn.HeaderText = "IDNgoaiTe";
			this.uxIDNgoaiTeDataGridViewColumn.Name = "uxIDNgoaiTeDataGridViewColumn";
			this.uxIDNgoaiTeDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDNgoaiTeDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDNgoaiTeDataGridViewColumn.ReadOnly = false;		
			//
			// uxSoLuongTrongKhoDataGridViewColumn
			//
			this.uxSoLuongTrongKhoDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSoLuongTrongKhoDataGridViewColumn.DataPropertyName = "SoLuongTrongKho";
			this.uxSoLuongTrongKhoDataGridViewColumn.HeaderText = "SoLuongTrongKho";
			this.uxSoLuongTrongKhoDataGridViewColumn.Name = "uxSoLuongTrongKhoDataGridViewColumn";
			this.uxSoLuongTrongKhoDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSoLuongTrongKhoDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSoLuongTrongKhoDataGridViewColumn.ReadOnly = false;		
			//
			// uxTieuChuanKyThuatDataGridViewColumn
			//
			this.uxTieuChuanKyThuatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxTieuChuanKyThuatDataGridViewColumn.DataPropertyName = "TieuChuanKyThuat";
			this.uxTieuChuanKyThuatDataGridViewColumn.HeaderText = "TieuChuanKyThuat";
			this.uxTieuChuanKyThuatDataGridViewColumn.Name = "uxTieuChuanKyThuatDataGridViewColumn";
			this.uxTieuChuanKyThuatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxTieuChuanKyThuatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxTieuChuanKyThuatDataGridViewColumn.ReadOnly = false;		
			//
			// uxThongtinthemDataGridViewColumn
			//
			this.uxThongtinthemDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThongtinthemDataGridViewColumn.DataPropertyName = "Thongtinthem";
			this.uxThongtinthemDataGridViewColumn.HeaderText = "Thongtinthem";
			this.uxThongtinthemDataGridViewColumn.Name = "uxThongtinthemDataGridViewColumn";
			this.uxThongtinthemDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThongtinthemDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThongtinthemDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemDangBaoGiaDataGridViewColumn
			//
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.DataPropertyName = "ThoiDiemDangBaoGia";
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.HeaderText = "ThoiDiemDangBaoGia";
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.Name = "uxThoiDiemDangBaoGiaDataGridViewColumn";
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemDangBaoGiaDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemHetHieuLucDataGridViewColumn
			//
			this.uxThoiDiemHetHieuLucDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemHetHieuLucDataGridViewColumn.DataPropertyName = "ThoiDiemHetHieuLuc";
			this.uxThoiDiemHetHieuLucDataGridViewColumn.HeaderText = "ThoiDiemHetHieuLuc";
			this.uxThoiDiemHetHieuLucDataGridViewColumn.Name = "uxThoiDiemHetHieuLucDataGridViewColumn";
			this.uxThoiDiemHetHieuLucDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemHetHieuLucDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemHetHieuLucDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemChinhSuaDataGridViewColumn
			//
			this.uxThoiDiemChinhSuaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemChinhSuaDataGridViewColumn.DataPropertyName = "ThoiDiemChinhSua";
			this.uxThoiDiemChinhSuaDataGridViewColumn.HeaderText = "ThoiDiemChinhSua";
			this.uxThoiDiemChinhSuaDataGridViewColumn.Name = "uxThoiDiemChinhSuaDataGridViewColumn";
			this.uxThoiDiemChinhSuaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemChinhSuaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemChinhSuaDataGridViewColumn.ReadOnly = false;		
			//
			// uxThoiDiemCapNhatDataGridViewColumn
			//
			this.uxThoiDiemCapNhatDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxThoiDiemCapNhatDataGridViewColumn.DataPropertyName = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.HeaderText = "ThoiDiemCapNhat";
			this.uxThoiDiemCapNhatDataGridViewColumn.Name = "uxThoiDiemCapNhatDataGridViewColumn";
			this.uxThoiDiemCapNhatDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxThoiDiemCapNhatDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxThoiDiemCapNhatDataGridViewColumn.ReadOnly = false;		
			//
			// uxKeyBangGiaDataGridViewColumn
			//
			this.uxKeyBangGiaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKeyBangGiaDataGridViewColumn.DataPropertyName = "KeyBangGia";
			this.uxKeyBangGiaDataGridViewColumn.HeaderText = "KeyBangGia";
			this.uxKeyBangGiaDataGridViewColumn.Name = "uxKeyBangGiaDataGridViewColumn";
			this.uxKeyBangGiaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKeyBangGiaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKeyBangGiaDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDNgoaiTeDataGridViewColumn
			//				
			this.uxIDNgoaiTeDataGridViewColumn.DisplayMember = "KyHieu";	
			this.uxIDNgoaiTeDataGridViewColumn.ValueMember = "IDNgoaiTe";	
			this.uxIDNgoaiTeDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDNgoaiTeDataGridViewColumn.DataSource = uxIDNgoaiTeBindingSource;				
				
			//
			// uxIDSanPhamDataGridViewColumn
			//				
			this.uxIDSanPhamDataGridViewColumn.DisplayMember = "IDSanPhamDanhMuc";	
			this.uxIDSanPhamDataGridViewColumn.ValueMember = "IDSanPham";	
			this.uxIDSanPhamDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDSanPhamDataGridViewColumn.DataSource = uxIDSanPhamBindingSource;				
				
			//
			// uxIDDiaBanDataGridViewColumn
			//				
			this.uxIDDiaBanDataGridViewColumn.DisplayMember = "IDDiaBanCha";	
			this.uxIDDiaBanDataGridViewColumn.ValueMember = "IDDiaBan";	
			this.uxIDDiaBanDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDDiaBanDataGridViewColumn.DataSource = uxIDDiaBanBindingSource;				
				
			//
			// uxIDNhaCungCapDataGridViewColumn
			//				
			this.uxIDNhaCungCapDataGridViewColumn.DisplayMember = "NhaCungCap";	
			this.uxIDNhaCungCapDataGridViewColumn.ValueMember = "IDNhaCungCap";	
			this.uxIDNhaCungCapDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDNhaCungCapDataGridViewColumn.DataSource = uxIDNhaCungCapBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxBangGiaSanPhamDataGridView);
			this.Name = "BangGiaSanPhamDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDNgoaiTeBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDSanPhamBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDDiaBanBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDNhaCungCapBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBangGiaSanPhamBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				BangGiaSanPhamDataGridViewEventArgs args = new BangGiaSanPhamDataGridViewEventArgs();
				args.BangGiaSanPham = _currentBangGiaSanPham;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class BangGiaSanPhamDataGridViewEventArgs : System.EventArgs
		{
			private Entities.BangGiaSanPham	_BangGiaSanPham;
	
			/// <summary>
			/// the  Entities.BangGiaSanPham instance.
			/// </summary>
			public Entities.BangGiaSanPham BangGiaSanPham
			{
				get { return _BangGiaSanPham; }
				set { _BangGiaSanPham = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxBangGiaSanPhamDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnBangGiaSanPhamDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxBangGiaSanPhamDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnBangGiaSanPhamDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxBangGiaSanPhamDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDSanPhamDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].IDSanPham;
						break;
					case "uxIDNhaCungCapDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].IDNhaCungCap;
						break;
					case "uxIDDiaBanDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].IDDiaBan;
						break;
					case "uxKichHoatDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].KichHoat;
						break;
					case "uxChungThucDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ChungThuc;
						break;
					case "uxTrangThaiDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].TrangThai;
						break;
					case "uxChoNhapGiaDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ChoNhapGia;
						break;
					case "uxDonGiaDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].DonGia;
						break;
					case "uxVATDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].VAT;
						break;
					case "uxIDNgoaiTeDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].IDNgoaiTe;
						break;
					case "uxSoLuongTrongKhoDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].SoLuongTrongKho;
						break;
					case "uxTieuChuanKyThuatDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].TieuChuanKyThuat;
						break;
					case "uxThongtinthemDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].Thongtinthem;
						break;
					case "uxThoiDiemDangBaoGiaDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ThoiDiemDangBaoGia;
						break;
					case "uxThoiDiemHetHieuLucDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ThoiDiemHetHieuLuc;
						break;
					case "uxThoiDiemChinhSuaDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ThoiDiemChinhSua;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].ThoiDiemCapNhat;
						break;
					case "uxKeyBangGiaDataGridViewColumn":
						e.Value = BangGiaSanPhamList[e.RowIndex].KeyBangGia;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxBangGiaSanPhamDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnBangGiaSanPhamDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxBangGiaSanPhamDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDSanPhamDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].IDSanPham = (System.Guid)e.Value;
						break;
					case "uxIDNhaCungCapDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].IDNhaCungCap = (System.Guid)e.Value;
						break;
					case "uxIDDiaBanDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].IDDiaBan = (System.Guid)e.Value;
						break;
					case "uxKichHoatDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].KichHoat = (System.Boolean)e.Value;
						break;
					case "uxChungThucDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ChungThuc = (System.Boolean)e.Value;
						break;
					case "uxTrangThaiDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].TrangThai = (System.Boolean)e.Value;
						break;
					case "uxChoNhapGiaDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ChoNhapGia = (System.Boolean)e.Value;
						break;
					case "uxDonGiaDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].DonGia = (System.Decimal)e.Value;
						break;
					case "uxVATDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].VAT = (System.Double)e.Value;
						break;
					case "uxIDNgoaiTeDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].IDNgoaiTe = (System.Guid)e.Value;
						break;
					case "uxSoLuongTrongKhoDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].SoLuongTrongKho = (System.Int64?)e.Value;
						break;
					case "uxTieuChuanKyThuatDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].TieuChuanKyThuat = (System.String)e.Value;
						break;
					case "uxThongtinthemDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].Thongtinthem = (System.String)e.Value;
						break;
					case "uxThoiDiemDangBaoGiaDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ThoiDiemDangBaoGia = (System.DateTime)e.Value;
						break;
					case "uxThoiDiemHetHieuLucDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ThoiDiemHetHieuLuc = (System.DateTime)e.Value;
						break;
					case "uxThoiDiemChinhSuaDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ThoiDiemChinhSua = (System.DateTime)e.Value;
						break;
					case "uxThoiDiemCapNhatDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].ThoiDiemCapNhat = (System.DateTime)e.Value;
						break;
					case "uxKeyBangGiaDataGridViewColumn":
						BangGiaSanPhamList[e.RowIndex].KeyBangGia = (System.Guid)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
